package com.example.service.impl;

import com.example.entity.StudentAnswer;
import com.example.mapper.StudentAnswerMapper;
import com.example.service.StudentAnswerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author： wzz
 * @date： 2021-12-04 15:36
 */
@Service
public class StudentAnswerServiceImpl implements StudentAnswerService {

    @Resource
    private StudentAnswerMapper studentAnswerMapper;

    @Override
    public List<StudentAnswer> getAnswerCheck(String book_name) {
        return studentAnswerMapper.IsCheck(book_name);

    }

    @Override
    public Integer updateScore(StudentAnswer studentAnswer) {
        return studentAnswerMapper.updateScore(studentAnswer);
    }

    @Override
    public int insertMu(StudentAnswer studentAnswer) {
        return studentAnswerMapper.insertMu(studentAnswer);
    }

    @Override
    public int insertOption(StudentAnswer studentAnswer) {
        return studentAnswerMapper.insertOption(studentAnswer);
    }

    @Override
    public List<StudentAnswer> getAnswers(String studentNumber,String book_name,String menu_topic) {
        return studentAnswerMapper.getAnswers(studentNumber,book_name,menu_topic);
    }

    @Override
    public int updateVideoDuration(String studentNumber, String book_name, String menu_topic,Integer duration) {
        return studentAnswerMapper.updateVideoDuration(studentNumber, book_name, menu_topic,duration);
    }

    @Override
    public Integer getVideoTime(String studentNumber, String book_name, String menu_topic) {
        return studentAnswerMapper.getVideoTime(studentNumber,book_name,menu_topic);
    }
}
